package testcase.framework.packaging;

import java.io.File;

import org.junit.Test;

import satir.framework.packaging.Packager;
import satir.framework.packaging.Packager.PackageExtractDestinactionWriteFailure;
import satir.framework.packaging.Packager.PackagerArchieveFileDestinationNotFoundException;
import satir.framework.packaging.Packager.PackagerArchieveFileToBeArchievedNotFoundException;
import satir.framework.packaging.Packager.PackagerArchieveZipFileWriteFailureException;
import satir.framework.packaging.Packager.PackagerExtractAchieveFileContentInvalidException;
import satir.framework.packaging.Packager.PackagerExtractAchieveFileNotFoundException;

import junit.framework.TestCase;

import junitx.util.PrivateAccessor;

public class Packager_extract_1 extends TestCase {

	/**
	 * Sets up the test fixture.
	 * 
	 * Called before every test case method.
	 */
	public void setUp() {

	}

	/**
	 * Tears down the test fixture.
	 * 
	 * Called after every test case method.
	 */
	public void tearDown() {
	}

	/**
	 * Step number : 1
	 * Goal: Extract "save/file.save" to directory of "temp/game01/"
	 */
	@Test
	public void testExtract1() {
		Packager target = new Packager("save/Antony.save");
		String destination = "temp/game01/";
		try {
			target.extract("save/file.save", destination);
			assertEquals(true, true);
		} catch (PackagerArchieveFileDestinationNotFoundException e1) {
			e1.printStackTrace();
			fail(e1.toString());
		} catch (PackagerExtractAchieveFileNotFoundException e) {
			e.printStackTrace();
			fail(e.toString());
		} catch (PackagerExtractAchieveFileContentInvalidException e) {
			e.printStackTrace();
			fail(e.toString());
		} catch (PackageExtractDestinactionWriteFailure e) {
			e.printStackTrace();
			fail(e.toString());
		}
	}
}
